<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>JSON Voorhees: Shared</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://www.mathjax.org/mathjax/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">JSON Voorhees
   </div>
   <div id="projectbrief">Killer JSON for C++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__Shared.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#friend-members">Friends</a>  </div>
  <div class="headertitle">
<div class="title">Shared</div>  </div>
</div><!--header-->
<div class="contents">

<p>These functions are applicable to all kinds of values and have the same fundemental meaning for all kinds.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga11b8dfc38c7a6ceac53c639f18aaebea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#ga11b8dfc38c7a6ceac53c639f18aaebea">jsonv::value::clear</a> ()</td></tr>
<tr class="memdesc:ga11b8dfc38c7a6ceac53c639f18aaebea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets this value to null.  <a href="#ga11b8dfc38c7a6ceac53c639f18aaebea">More...</a><br /></td></tr>
<tr class="separator:ga11b8dfc38c7a6ceac53c639f18aaebea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2d25930b6dc2644203361da27a1fef2b"><td class="memItemLeft" align="right" valign="top">jsonv::kind&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#ga2d25930b6dc2644203361da27a1fef2b">jsonv::value::kind</a> () const </td></tr>
<tr class="memdesc:ga2d25930b6dc2644203361da27a1fef2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get this value's kind.  <a href="#ga2d25930b6dc2644203361da27a1fef2b">More...</a><br /></td></tr>
<tr class="separator:ga2d25930b6dc2644203361da27a1fef2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4deebd24d01a9a729e3fceee3b62232a"><td class="memItemLeft" align="right" valign="top">value &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#ga4deebd24d01a9a729e3fceee3b62232a">jsonv::value::at_path</a> (const path &amp;p)</td></tr>
<tr class="memdesc:ga4deebd24d01a9a729e3fceee3b62232a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value specified by the path <em>p</em>.  <a href="#ga4deebd24d01a9a729e3fceee3b62232a">More...</a><br /></td></tr>
<tr class="separator:ga4deebd24d01a9a729e3fceee3b62232a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62607f42f165d22a04967315134c1f54"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga62607f42f165d22a04967315134c1f54"></a>
value &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::at_path</b> (string_view p)</td></tr>
<tr class="separator:ga62607f42f165d22a04967315134c1f54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2db1ccdbc34e7951e9242ffbf2983cb7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2db1ccdbc34e7951e9242ffbf2983cb7"></a>
value &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::at_path</b> (size_type p)</td></tr>
<tr class="separator:ga2db1ccdbc34e7951e9242ffbf2983cb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8a15759d2eb52b855021a87a67bf057b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8a15759d2eb52b855021a87a67bf057b"></a>
const value &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::at_path</b> (const path &amp;p) const </td></tr>
<tr class="separator:ga8a15759d2eb52b855021a87a67bf057b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7b2610f0a94753e3530f8e3fbf5fadd3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7b2610f0a94753e3530f8e3fbf5fadd3"></a>
const value &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::at_path</b> (string_view p) const </td></tr>
<tr class="separator:ga7b2610f0a94753e3530f8e3fbf5fadd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6f5b885e53fbbab10ea7ff529743c638"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6f5b885e53fbbab10ea7ff529743c638"></a>
const value &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::at_path</b> (size_type p) const </td></tr>
<tr class="separator:ga6f5b885e53fbbab10ea7ff529743c638"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa32d3d92b8f59097b10648cf585533f4"><td class="memItemLeft" align="right" valign="top">size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#gaa32d3d92b8f59097b10648cf585533f4">jsonv::value::count_path</a> (const path &amp;p) const </td></tr>
<tr class="memdesc:gaa32d3d92b8f59097b10648cf585533f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Similar to <code>count</code>, but walks the given path <em>p</em> to determine its presence.  <a href="#gaa32d3d92b8f59097b10648cf585533f4">More...</a><br /></td></tr>
<tr class="separator:gaa32d3d92b8f59097b10648cf585533f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga659ffaed62f676ef9bcd4d447b2c5524"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga659ffaed62f676ef9bcd4d447b2c5524"></a>
size_type&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::count_path</b> (string_view p) const </td></tr>
<tr class="separator:ga659ffaed62f676ef9bcd4d447b2c5524"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga22b9339eaca88c988d2fceaa29775e01"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga22b9339eaca88c988d2fceaa29775e01"></a>
size_type&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::count_path</b> (size_type p) const </td></tr>
<tr class="separator:ga22b9339eaca88c988d2fceaa29775e01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5fef3e201f1d7661ca0aab45bdd2d4e9"><td class="memItemLeft" align="right" valign="top">value &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#ga5fef3e201f1d7661ca0aab45bdd2d4e9">jsonv::value::path</a> (const path &amp;p)</td></tr>
<tr class="memdesc:ga5fef3e201f1d7661ca0aab45bdd2d4e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get or create the value specified by the path <em>p</em>.  <a href="#ga5fef3e201f1d7661ca0aab45bdd2d4e9">More...</a><br /></td></tr>
<tr class="separator:ga5fef3e201f1d7661ca0aab45bdd2d4e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0737e3c91a4743fa0ecec48c238af6cc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0737e3c91a4743fa0ecec48c238af6cc"></a>
value &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::path</b> (string_view p)</td></tr>
<tr class="separator:ga0737e3c91a4743fa0ecec48c238af6cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac03fbf6240a83ce3e876beec1923f296"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac03fbf6240a83ce3e876beec1923f296"></a>
value &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::path</b> (size_type p)</td></tr>
<tr class="separator:gac03fbf6240a83ce3e876beec1923f296"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacea6f1f938880b1b1761324e59abad83"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#gacea6f1f938880b1b1761324e59abad83">jsonv::value::swap</a> (value &amp;other) noexcept</td></tr>
<tr class="memdesc:gacea6f1f938880b1b1761324e59abad83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap the value this instance represents with <em>other</em>.  <a href="#gacea6f1f938880b1b1761324e59abad83">More...</a><br /></td></tr>
<tr class="separator:gacea6f1f938880b1b1761324e59abad83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga22d5a5d815048ca653136ef404668cf4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#ga22d5a5d815048ca653136ef404668cf4">jsonv::value::operator==</a> (const value &amp;other) const </td></tr>
<tr class="memdesc:ga22d5a5d815048ca653136ef404668cf4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two JSON values for equality.  <a href="#ga22d5a5d815048ca653136ef404668cf4">More...</a><br /></td></tr>
<tr class="separator:ga22d5a5d815048ca653136ef404668cf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5a94bbcbaa79b35a4a24c0ceeb3ca7be"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#ga5a94bbcbaa79b35a4a24c0ceeb3ca7be">jsonv::value::operator!=</a> (const value &amp;other) const </td></tr>
<tr class="memdesc:ga5a94bbcbaa79b35a4a24c0ceeb3ca7be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two JSON values for inequality.  <a href="#ga5a94bbcbaa79b35a4a24c0ceeb3ca7be">More...</a><br /></td></tr>
<tr class="separator:ga5a94bbcbaa79b35a4a24c0ceeb3ca7be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga05f2fca552d114e678040be40c8cbc06"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#ga05f2fca552d114e678040be40c8cbc06">jsonv::value::compare</a> (const value &amp;other) const </td></tr>
<tr class="memdesc:ga05f2fca552d114e678040be40c8cbc06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used to build a strict-ordering of JSON values.  <a href="#ga05f2fca552d114e678040be40c8cbc06">More...</a><br /></td></tr>
<tr class="separator:ga05f2fca552d114e678040be40c8cbc06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20e0a977720b5083be3ec231450509c8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga20e0a977720b5083be3ec231450509c8"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::operator&lt;</b> (const value &amp;other) const </td></tr>
<tr class="separator:ga20e0a977720b5083be3ec231450509c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9f977b98e907066a2b6ce6adb5bc3e2e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9f977b98e907066a2b6ce6adb5bc3e2e"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::operator&gt;</b> (const value &amp;other) const </td></tr>
<tr class="separator:ga9f977b98e907066a2b6ce6adb5bc3e2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8475093f510f162185b933ba4a44bcd5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8475093f510f162185b933ba4a44bcd5"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::operator&lt;=</b> (const value &amp;other) const </td></tr>
<tr class="separator:ga8475093f510f162185b933ba4a44bcd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabc765cf852dce2e36b54388ba5b5e42d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabc765cf852dce2e36b54388ba5b5e42d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value::operator&gt;=</b> (const value &amp;other) const </td></tr>
<tr class="separator:gabc765cf852dce2e36b54388ba5b5e42d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc0eb6d0e3b9a8dcfba8c36c19ced691"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#gafc0eb6d0e3b9a8dcfba8c36c19ced691">jsonv::value::empty</a> () const </td></tr>
<tr class="memdesc:gafc0eb6d0e3b9a8dcfba8c36c19ced691"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the underlying structure empty? This has similar meaning for all types it works on and is always equivalent to asking if the size is 0.  <a href="#gafc0eb6d0e3b9a8dcfba8c36c19ced691">More...</a><br /></td></tr>
<tr class="separator:gafc0eb6d0e3b9a8dcfba8c36c19ced691"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga79c3e426d63d6c658470ee2295b35f82"><td class="memItemLeft" align="right" valign="top">size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#ga79c3e426d63d6c658470ee2295b35f82">jsonv::value::size</a> () const </td></tr>
<tr class="memdesc:ga79c3e426d63d6c658470ee2295b35f82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of items in this value.  <a href="#ga79c3e426d63d6c658470ee2295b35f82">More...</a><br /></td></tr>
<tr class="separator:ga79c3e426d63d6c658470ee2295b35f82"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friend-members"></a>
Friends</h2></td></tr>
<tr class="memitem:gacff1f9d0e10df14e2a1440911e30ef7e"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#gacff1f9d0e10df14e2a1440911e30ef7e">jsonv::value::operator&lt;&lt;</a> (std::ostream &amp;stream, const value &amp;val)</td></tr>
<tr class="memdesc:gacff1f9d0e10df14e2a1440911e30ef7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Output this value to a stream.  <a href="#gacff1f9d0e10df14e2a1440911e30ef7e">More...</a><br /></td></tr>
<tr class="separator:gacff1f9d0e10df14e2a1440911e30ef7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadac006e646d57212ae0de2f87917a584"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Shared.html#gadac006e646d57212ae0de2f87917a584">jsonv::value::to_string</a> (const value &amp;)</td></tr>
<tr class="memdesc:gadac006e646d57212ae0de2f87917a584"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a string representation of the given <code>value</code>.  <a href="#gadac006e646d57212ae0de2f87917a584">More...</a><br /></td></tr>
<tr class="separator:gadac006e646d57212ae0de2f87917a584"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>These functions are applicable to all kinds of values and have the same fundemental meaning for all kinds. </p>
<p>These functions are only applicable if the kind of this value is an array.</p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga4deebd24d01a9a729e3fceee3b62232a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">value&amp; jsonv::value::at_path </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classjsonv_1_1path.html">path</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the value specified by the path <em>p</em>. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::out_of_range</td><td>if any path along the chain did not exist. </td></tr>
    <tr><td class="paramname"><a class="el" href="classjsonv_1_1kind__error.html" title="Thrown from various value methods when attempting to perform an operation which is not valid for the ...">kind_error</a></td><td>if the path traversal is not valid for the value (for example: if the path specifies an array index when the value is a string). </td></tr>
    <tr><td class="paramname"><a class="el" href="classjsonv_1_1parse__error.html" title="An error encountered when parsing. ">parse_error</a></td><td>if a <code>string_view</code> was specified that did not have a valid specification (see <code><a class="el" href="classjsonv_1_1path.html#aafa798395256d7ea06e3cbe2de5f940b" title="Create a path from a string definition. ">path::create</a></code>). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga11b8dfc38c7a6ceac53c639f18aaebea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void jsonv::value::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resets this value to null. </p>

</div>
</div>
<a class="anchor" id="ga05f2fca552d114e678040be40c8cbc06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jsonv::value::compare </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classjsonv_1_1value.html">value</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used to build a strict-ordering of JSON values. </p>
<p>When comparing values of the same kind, the ordering should align with your intuition. When comparing values of different kinds, some arbitrary rules were created based on how "complicated" the author thought the type to be.</p>
<ul>
<li>null: less than everything but null, which it is equal to.</li>
<li>boolean: false is less than true.</li>
<li>integer, decimal: compared by their numeric value. Comparisons between two integers do not cast, but comparison between an integer and a decimal will coerce to decimal.</li>
<li>string: compared lexicographically by character code (with basic char strings and non-ASCII encoding, this might lead to surprising results)</li>
<li>array: compared lexicographically by elements (recursively following this same technique)</li>
<li>object: entries in the object are sorted and compared lexicographically, first by key then by value</li>
</ul>
<dl class="section return"><dt>Returns</dt><dd>-1 if this is less than other by the rules stated above; 0 if this is equal to other; -1 if otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa32d3d92b8f59097b10648cf585533f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_type jsonv::value::count_path </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classjsonv_1_1path.html">path</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Similar to <code>count</code>, but walks the given path <em>p</em> to determine its presence. </p>
<dl class="section return"><dt>Returns</dt><dd><code>1</code> if the path finds an element; <code>0</code> if there is no such path in the tree.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classjsonv_1_1parse__error.html" title="An error encountered when parsing. ">parse_error</a></td><td>if a <code>string_view</code> was specified that did not have a valid specification (see <code><a class="el" href="classjsonv_1_1path.html#aafa798395256d7ea06e3cbe2de5f940b" title="Create a path from a string definition. ">path::create</a></code>). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafc0eb6d0e3b9a8dcfba8c36c19ced691"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool jsonv::value::empty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Is the underlying structure empty? This has similar meaning for all types it works on and is always equivalent to asking if the size is 0. </p>
<ul>
<li>object: Are there no keys?</li>
<li>array: Are there no values?</li>
<li>string: Is the string 0 length?</li>
</ul>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classjsonv_1_1kind__error.html" title="Thrown from various value methods when attempting to perform an operation which is not valid for the ...">kind_error</a></td><td>if the kind is not an object, array or string. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2d25930b6dc2644203361da27a1fef2b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">jsonv::kind jsonv::value::kind </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get this value's kind. </p>

<p>Definition at line <a class="el" href="value_8hpp_source.html#l00564">564</a> of file <a class="el" href="value_8hpp_source.html">value.hpp</a>.</p>

</div>
</div>
<a class="anchor" id="ga5a94bbcbaa79b35a4a24c0ceeb3ca7be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool jsonv::value::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classjsonv_1_1value.html">value</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compares two JSON values for inequality. </p>
<p>The rules for inequality are the exact opposite of equality. </p>

</div>
</div>
<a class="anchor" id="ga22d5a5d815048ca653136ef404668cf4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool jsonv::value::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classjsonv_1_1value.html">value</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compares two JSON values for equality. </p>
<p>Two JSON values are equal if and only if all of the following conditions apply:</p>
<ol type="1">
<li>They have the same valid value for <code>kind</code>.<ul>
<li>If <code>kind</code> is invalid (memory corruption), then two JSON values are <em>not</em> equal, even if they have been corrupted in the same way and even if they share <code>this</code> (a corrupt object is not equal to itself).</li>
</ul>
</li>
<li>The kind comparison is also equal:<ul>
<li>Two null values are always equivalent.</li>
<li>string, integer, decimal and boolean follow the classic rules for their type.</li>
<li>objects are equal if they have the same keys and values corresponding with the same key are also equal.</li>
<li>arrays are equal if they have the same length and the values at each index are also equal.</li>
</ul>
</li>
</ol>
<dl class="section note"><dt>Note</dt><dd>The rules for equality are based on Python <code>dict</code> and <code>list</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga5fef3e201f1d7661ca0aab45bdd2d4e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">value&amp; jsonv::value::path </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classjsonv_1_1path.html">path</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get or create the value specified by the path <em>p</em>. </p>
<p>This is the moral equivalent to <code>operator</code>[] for paths. If no value exists at the path, a new one is created as the default (<code>null</code>) value. If any path along the way either does not exist or is <code>null</code>, it is created for you, based on the <em>implications</em> of the specification <em>p</em>. Unlike <code>at_path</code>, which will throw if accessing a non-existent key of an <code>object</code> or going past the end of an <code>array</code>, this will simply create that path and fill in the blanks with <code>null</code> values.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classjsonv_1_1kind__error.html" title="Thrown from various value methods when attempting to perform an operation which is not valid for the ...">kind_error</a></td><td>if the path traversal is not valid for the value (for example: if the path specifies an array index when the value is a string). </td></tr>
    <tr><td class="paramname"><a class="el" href="classjsonv_1_1parse__error.html" title="An error encountered when parsing. ">parse_error</a></td><td>if a <code>string_view</code> was specified that did not have a valid specification (see <code><a class="el" href="classjsonv_1_1path.html#aafa798395256d7ea06e3cbe2de5f940b" title="Create a path from a string definition. ">path::create</a></code>).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__Shared.html#ga4deebd24d01a9a729e3fceee3b62232a" title="Get the value specified by the path p. ">at_path</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga79c3e426d63d6c658470ee2295b35f82"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_type jsonv::value::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of items in this value. </p>
<ul>
<li>object: The number of key/value pairs.</li>
<li>array: The number of values.</li>
<li>string: The number of code points in the string (including <code>\0</code> values and counting multi-byte encodings as more than one value).</li>
</ul>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classjsonv_1_1kind__error.html" title="Thrown from various value methods when attempting to perform an operation which is not valid for the ...">kind_error</a></td><td>if the kind is not an object, array or string. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gacea6f1f938880b1b1761324e59abad83"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void jsonv::value::swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classjsonv_1_1value.html">value</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Swap the value this instance represents with <em>other</em>. </p>

</div>
</div>
<h2 class="groupheader">Friends</h2>
<a class="anchor" id="gacff1f9d0e10df14e2a1440911e30ef7e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream&amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classjsonv_1_1value.html">value</a> &amp;&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Output this value to a stream. </p>

</div>
</div>
<a class="anchor" id="gadac006e646d57212ae0de2f87917a584"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string to_string </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classjsonv_1_1value.html">value</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get a string representation of the given <code>value</code>. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
  </ul>
</div>
</body>
</html>
